﻿@using System.Text.RegularExpressions
@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>
@{
    string str = @"<html><body>
                                                                                                                                  


                                                                                                                                  

<li class='clearfix car_list_less ac_item' data-entid='31066032812365' logr='advert_2_31904681649671_31066032812365_sortid:556047381@npos:1@tag:cjh-fqf' _pos='1' sortid='' infoproperty='' data-click='{'infotype':'advertInfo','rel_pos':'1','abs_pos':'1'}' mid='0' onclick=''>
    <div class='col col1'>
        <a href='http://cq.58.com/ershouche/31066032812365x.shtml?sourceKey=s_AAAMF3%2BvO78bOpIL%2BvJGb3fdV3c0NdpnythIOeyYuFGgHMlmu4oaE3HSGhwu0CFbTA8AfQ%3D%3D&typos=advertInfo_l1&comefrom=WBERSHOUCHE_119_448533104&infotype=advert_2_3'
           target='_blank' name='31066032812365'
           onclick='clickLog('from=pc_esc_xlist_listing_a_click');clickLog('from=logtype=clicklog&infoid=31066032812365&testID=expclick-WBERSHOUCHE_118_941805948'); '
           tongji_label='listclick' class='ac_linkurl'>
                            <img src='http://pic5.58cdn.com.cn/p1/small/n_v2f846e3c48c804f258cb56e27d8fb1236.jpg?w=200&h=150&crop=1'/>
                    </a>
    </div>
    <div class='col col2'>
        <a href='http://cq.58.com/ershouche/31066032812365x.shtml?sourceKey=s_AAAMF3%2BvO78bOpIL%2BvJGb3fdV3c0NdpnythIOeyYuFGgHMlmu4oaE3HSGhwu0CFbTA8AfQ%3D%3D&typos=advertInfo_l1&comefrom=WBERSHOUCHE_119_448533104&infotype=advert_2_3'
           target='_blank' name='31066032812365'
           onclick='clickLog('from=pc_esc_xlist_listing_a_click');clickLog('from=logtype=clicklog&infoid=31066032812365&testID=expclick-WBERSHOUCHE_118_941805948'); '
           tongji_label='listclick'  class='ac_linkurl'>
            <h1 class='info_tit'>
                奇瑞 E3 2013款 1.5 手动 智尚型-代过户.有质保.车况好.可外迁
                            </h1>
        </a>
        <div class='info_param'>
 		      		       		 	 		          
<span>2014年</span><span>7.16万公里</span>				<span>1.5升</span>
	<span>手动</span></div>
        <div class='info_tags'>
		<div class='tags_left' style='float: left;'>
						            <a href='http://apply.vip.58.com/productinfo/qc/' target='_blank' rel='nofollow'>
								            </a>
									              <em title='车架号已验证'>车架号已验</em>
									            <em>可分期付</em>
						</div>
<span class='im-chat' onClick='clickLog('from=esc_pc_list_bangbang');' data-im='%7B%22postid%22%3A%2231066032812365%22%2C%22cateid%22%3A29%2C%22userid%22%3A%2231904681649671%22%2C%22rootcateid%22%3A%224%22%7D'></span>
</div>
    </div>
    <div class='col col3'>
                    <h3>2.88<span>万</span></h3>
            </div>
    	    	<div class='col col4'>
			    	        <p class='guess_like post_time'>17.08.14</p>	    							</div>
    </li>















        
	                                                                                                                              

<li class='clearfix car_list_less ac_item' data-entid='31063826789686' logr='advert_2_31904681649671_31063826789686_sortid:556030146@npos:2@tag:cjh-fqf' _pos='2' sortid='' infoproperty='' data-click='{'infotype':'advertInfo','rel_pos':'2','abs_pos':'2'}' mid='0' onclick=''>
    <div class='col col1'>
        <a href='http://cq.58.com/ershouche/31063826789686x.shtml?sourceKey=s_AAAI2kaFTKi%2BV6oPT7ogxLhgw5ZNhHLFJygyPvyLFKvtWTaReHdzwfL1wpnKrsUJYLE%2Fng%3D%3D&typos=advertInfo_l2&comefrom=WBERSHOUCHE_119_448533104&infotype=advert_2_3'
           target='_blank' name='31063826789686'
           onclick='clickLog('from=pc_esc_xlist_listing_a_click');clickLog('from=logtype=clicklog&infoid=31063826789686&testID=expclick-WBERSHOUCHE_118_941805948'); '
           tongji_label='listclick' class='ac_linkurl'>
                            <img src='http://pic1.58cdn.com.cn/p1/small/n_v2baaa174122f9452c81154df520844f06.jpg?w=200&h=150&crop=1'/>
                    </a>
    </div>
    <div class='col col2'>
        <a href='http://cq.58.com/ershouche/31063826789686x.shtml?sourceKey=s_AAAI2kaFTKi%2BV6oPT7ogxLhgw5ZNhHLFJygyPvyLFKvtWTaReHdzwfL1wpnKrsUJYLE%2Fng%3D%3D&typos=advertInfo_l2&comefrom=WBERSHOUCHE_119_448533104&infotype=advert_2_3'
           target='_blank' name='31063826789686'
           onclick='clickLog('from=pc_esc_xlist_listing_a_click');clickLog('from=logtype=clicklog&infoid=31063826789686&testID=expclick-WBERSHOUCHE_118_941805948'); '
           tongji_label='listclick'  class='ac_linkurl'>
            <h1 class='info_tit'>
                铃木 雨燕 2013款 1.5 自动 标准版-代过户.有质保.车况好.可外迁
                            </h1>
        </a>
        <div class='info_param'>
 		      		       		 	 		          
<span>2013年</span><span>9.93万公里</span>				<span>1.5升</span>
	<span>自动</span></div>
        <div class='info_tags'>
		<div class='tags_left' style='float: left;'>
						            <a href='http://apply.vip.58.com/productinfo/qc/' target='_blank' rel='nofollow'>
								            </a>
									              <em title='车架号已验证'>车架号已验</em>
									            <em>可分期付</em>
						</div>
<span class='im-chat' onClick='clickLog('from=esc_pc_list_bangbang');' data-im='%7B%22postid%22%3A%2231063826789686%22%2C%22cateid%22%3A29%2C%22userid%22%3A%2231904681649671%22%2C%22rootcateid%22%3A%224%22%7D'></span>
</div>
    </div>
    <div class='col col3'>
                    <h3>4.2<span>万</span></h3>
            </div>
    	    	<div class='col col4'>
			    	        <p class='guess_like post_time'>17.08.14</p>	    							</div>
    </li>
    
	                                                                                                               

<li class='clearfix car_list_less ac_item' data-entid='31208709232190' logr='p_0_15933153879558_31208709232190_sortid:557162040@ses:defaultrank^0@npos:41@tag:sj-xsz' _pos='41' sortid='' infoproperty='' data-click='{'infotype':'commoninfo','rel_pos':'41','abs_pos':'56'}' mid='0' onclick=''>
    <div class='col col1'>
        <a href='http://cq.58.com/ershouche/31208709232190x.shtml?typos=commoninfo_l56&comefrom=WBERSHOUCHE_119_448533104&infotype=p_0_159331'
           target='_blank' name='31208709232190'
           onclick='clickLog('from=pc_esc_xlist_listing_a_click');clickLog('from=logtype=clicklog&infoid=31208709232190&testID=expclick-WBERSHOUCHE_118_941805948'); '
           tongji_label='listclick' class='ac_linkurl'>
                            <img src='http://pic2.58cdn.com.cn/mobile/small/n_v295a7bb147e134a389abe2535bb196f66.jpg?w=200&h=150&crop=1'/>
                    </a>
    </div>
    <div class='col col2'>
        <a href='http://cq.58.com/ershouche/31208709232190x.shtml?typos=commoninfo_l56&comefrom=WBERSHOUCHE_119_448533104&infotype=p_0_159331'
           target='_blank' name='31208709232190'
           onclick='clickLog('from=pc_esc_xlist_listing_a_click');clickLog('from=logtype=clicklog&infoid=31208709232190&testID=expclick-WBERSHOUCHE_118_941805948'); '
           tongji_label='listclick'  class='ac_linkurl'>
            <h1 class='info_tit'>
                五菱 宏光 2010款 1.4 手动 豪华型
                            </h1>
        </a>
        <div class='info_param'>
 		      		       		 	 		          
<span>2012年</span><span>17万公里</span>				<span>1.4升</span>
	<span>手动</span></div>
        <div class='info_tags'>
		<div class='tags_left' style='float: left;'>
						              <em>商家</em>
									<em title='该车辆的行驶证已通过58审核'>行驶证已验</em>
														</div>
<span class='im-chat' onClick='clickLog('from=esc_pc_list_bangbang');' data-im='%7B%22postid%22%3A%2231208709232190%22%2C%22cateid%22%3A29%2C%22userid%22%3A%2215933153879558%22%2C%22rootcateid%22%3A%224%22%7D'></span>
</div>
    </div>
    <div class='col col3'>
                    <h3>2.8<span>万</span></h3>
            </div>
    	    	<div class='col col4'>
			    	        <p class='guess_like post_time'>3天前</p>	    							</div>
    </li>















        
	                                                                                                     

<li class='clearfix car_list_less ac_item' data-entid='31111274620599' logr='p_0_31463502965258_31111274620599_sortid:557161954@ses:defaultrank^0@npos:42@tag:gr' _pos='42' sortid='' infoproperty='' data-click='{'infotype':'commoninfo','rel_pos':'42','abs_pos':'57'}' mid='0' onclick=''>
    <div class='col col1'>
        <a href='http://cq.58.com/ershouche/31111274620599x.shtml?typos=commoninfo_l57&comefrom=WBERSHOUCHE_119_448533104&infotype=p_0_314635'
           target='_blank' name='31111274620599'
           onclick='clickLog('from=pc_esc_xlist_listing_a_click');clickLog('from=logtype=clicklog&infoid=31111274620599&testID=expclick-WBERSHOUCHE_118_941805948'); '
           tongji_label='listclick' class='ac_linkurl'>
                            <img src='http://pic5.58cdn.com.cn/mobile/small/n_v2c4f9dbca1e734b26955b8c3da7ab0590.jpg?w=200&h=150&crop=1'/>
                    </a>
    </div>
    <div class='col col2'>
        <a href='http://cq.58.com/ershouche/31111274620599x.shtml?typos=commoninfo_l57&comefrom=WBERSHOUCHE_119_448533104&infotype=p_0_314635'
           target='_blank' name='31111274620599'
           onclick='clickLog('from=pc_esc_xlist_listing_a_click');clickLog('from=logtype=clicklog&infoid=31111274620599&testID=expclick-WBERSHOUCHE_118_941805948'); '
           tongji_label='listclick'  class='ac_linkurl'>
            <h1 class='info_tit'>
                瑞麒 G3 2012款 1.6 手动 舒适型
                            </h1>
        </a>
        <div class='info_param'>
 		      		       		 	 		          
<span>2012年</span><span>7万公里</span>				<span>1.6升</span>
	<span>手动</span></div>
        <div class='info_tags'>
		<div class='tags_left' style='float: left;'>
						             <em>个人</em>
																		</div>
<span class='im-chat' onClick='clickLog('from=esc_pc_list_bangbang');' data-im='%7B%22postid%22%3A%2231111274620599%22%2C%22cateid%22%3A29%2C%22userid%22%3A%2231463502965258%22%2C%22rootcateid%22%3A%224%22%7D'></span>
</div>
    </div>
    <div class='col col3'>
                    <h3>3.39<span>万</span></h3>
            </div>
    	    	<div class='col col4'>
			    	        <p class='guess_like post_time'>3天前</p>	    							</div>
    </li>















        
	                                                                                                              

<li class='clearfix car_list_less ac_item' data-entid='31208693411391' logr='p_0_18633859865351_31208693411391_sortid:557161917@ses:defaultrank^0@npos:43@tag:gr-xsz' _pos='43' sortid='' infoproperty='' data-click='{'infotype':'commoninfo','rel_pos':'43','abs_pos':'58'}' mid='0' onclick=''>
    <div class='col col1'>
        <a href='http://cq.58.com/ershouche/31208693411391x.shtml?typos=commoninfo_l58&comefrom=WBERSHOUCHE_119_448533104&infotype=p_0_186338'
           target='_blank' name='31208693411391'
           onclick='clickLog('from=pc_esc_xlist_listing_a_click');clickLog('from=logtype=clicklog&infoid=31208693411391&testID=expclick-WBERSHOUCHE_118_941805948'); '
           tongji_label='listclick' class='ac_linkurl'>
                            <img src='http://pic3.58cdn.com.cn/mobile/small/n_v2404f1427cd0946c28936ce806ee3fc47.jpg?w=200&h=150&crop=1'/>
                    </a>
    </div>
    <div class='col col2'>
        <a href='http://cq.58.com/ershouche/31208693411391x.shtml?typos=commoninfo_l58&comefrom=WBERSHOUCHE_119_448533104&infotype=p_0_186338'
           target='_blank' name='31208693411391'
           onclick='clickLog('from=pc_esc_xlist_listing_a_click');clickLog('from=logtype=clicklog&infoid=31208693411391&testID=expclick-WBERSHOUCHE_118_941805948'); '
           tongji_label='listclick'  class='ac_linkurl'>
            <h1 class='info_tit'>
                斯巴鲁 BRZ 2013款 2.0 手自一体 豪华型
                            </h1>
        </a>
        <div class='info_param'>
 		      		       		 	 		          
<span>2016年</span><span>1万公里</span>				<span>2.0升</span>
	<span>自动</span></div>
        <div class='info_tags'>
		<div class='tags_left' style='float: left;'>
						             <em>个人</em>
									<em title='该车辆的行驶证已通过58审核'>行驶证已验</em>
														</div>
<span class='im-chat' onClick='clickLog('from=esc_pc_list_bangbang');' data-im='%7B%22postid%22%3A%2231208693411391%22%2C%22cateid%22%3A29%2C%22userid%22%3A%2218633859865351%22%2C%22rootcateid%22%3A%224%22%7D'></span>
</div>
    </div>
    <div class='col col3'>
                    <h3>23<span>万</span></h3>
            </div>
    	    	<div class='col col4'>
			    	        <p class='guess_like post_time'>3天前</p>	    							</div>
    </li>















        
	                                                                                                                                       

<li class='clearfix car_list_less ac_item' data-entid='30213364656076' logr='p_2_21825188150791_30213364656076_sortid:557161826@ses:defaultrank^0@npos:44@tag:hy-zb-fqf' _pos='44' sortid='' infoproperty='' data-click='{'infotype':'commoninfo','rel_pos':'44','abs_pos':'59'}' mid='0' onclick=''>
    <div class='col col1'>
        <a href='http://cq.58.com/ershouche/30213364656076x.shtml?typos=commoninfo_l59&comefrom=WBERSHOUCHE_119_448533104&infotype=p_2_218251'
           target='_blank' name='30213364656076'
           onclick='clickLog('from=pc_esc_xlist_listing_a_click');clickLog('from=logtype=clicklog&infoid=30213364656076&testID=expclick-WBERSHOUCHE_118_941805948'); '
           tongji_label='listclick' class='ac_linkurl'>
                            <img src='http://pic3.58cdn.com.cn/p1/small/n_v1bl2lwke7zevvtrrwf5pa.jpg?w=200&h=150&crop=1'/>
                    </a>
    </div>
    <div class='col col2'>
        <a href='http://cq.58.com/ershouche/30213364656076x.shtml?typos=commoninfo_l59&comefrom=WBERSHOUCHE_119_448533104&infotype=p_2_218251'
           target='_blank' name='30213364656076'
           onclick='clickLog('from=pc_esc_xlist_listing_a_click');clickLog('from=logtype=clicklog&infoid=30213364656076&testID=expclick-WBERSHOUCHE_118_941805948'); '
           tongji_label='listclick'  class='ac_linkurl'>
            <h1 class='info_tit'>
                奥迪 Q5 2010款 2.0TFSI 手自一体 进取型-4S店一手精品置换车源
                            </h1>
        </a>
        <div class='info_param'>
 		      		       		 	 		          
<span>2011年</span><span>12万公里</span>				<span>2.0升</span>
	<span>自动</span></div>
        <div class='info_tags'>
		<div class='tags_left' style='float: left;'>
						            <a href='http://apply.vip.58.com/productinfo/qc/' target='_blank' rel='nofollow'>
								                    <em>会员2年</em>
				            </a>
												            	<a class='icon_yczb' href='http://static.58.com/ui7/help/yczb.html?from=esc_meizhou_ztfactory' target='_blank'>
                <em>原厂质保</em>
            	</a>
						            <em>可分期付</em>
						</div>
<span class='im-chat' onClick='clickLog('from=esc_pc_list_bangbang');' data-im='%7B%22postid%22%3A%2230213364656076%22%2C%22cateid%22%3A29%2C%22userid%22%3A%2221825188150791%22%2C%22rootcateid%22%3A%224%22%7D'></span>
</div>
    </div>
    <div class='col col3'>
                    <h3>19.98<span>万</span></h3>
            </div>
    	    	<div class='col col4'>
			    	        <p class='guess_like post_time'>3天前</p>	    							</div>
    </li>
			
</body></html>";
    Regex reg = new Regex(@"<li.*?>(.*?)</li>", RegexOptions.IgnoreCase);
    //Regex reg = new Regex(@"<li.*?>([\s\S]*[^<]+?)</li>", RegexOptions.IgnoreCase);
    //Regex reg = new Regex(@"<li.*?>([^</li>]+)</li>", RegexOptions.IgnoreCase); //li标签不带属性
   
    Match m = reg.Match(str);
    while (m.Success)
    {
        Console.Write(m.Result("$1"));// 输出匹配到的li的内容
        <div>@(m.Result("$1"))</div>
       <hr/>
        m = m.NextMatch();
    }
}
